#{extends 'common/base.html' /}
 
<!-- content start -->
<div class="admin-content">
	<div class="am-cf am-padding">
		<div class="am-fl am-cf">
			<strong class="am-text-primary am-text-lg">生产计划</strong> / <small>ProductionPlan</small>
		</div>
	</div>
	<form class="am-form" id="myform" action="@{upload()}" method="post" enctype="multipart/form-data">
		<div class="am-g">
			#{if type=='2'}
			<div class="am-u-sm-12 am-u-md-3" style="width: 50%;">
				<div class="am-form-group">
					<span style="float: left;">
					今日机台产能上传：
					</span> 
				   <input  data-options="prompt:'请选择规格文件'" name="myfile" id="upload" accept="application/vnd.ms-excel" type="file" style="float:left;"> 
					<input class="am-btn am-btn-default"  id="search_sub" type="submit" style="padding-top: -10px;" value="确认上传"> &nbsp;&nbsp;&nbsp;
					<input class="am-btn am-btn-default" id="download" type="button" onclick="goUrl('@{download}')" value="下载模板">
				</div>
			</div>
			
			#{/if}
		</div>
		</form>
	<div class="am-g">
		<div class="am-u-sm-12">
			<table class="am-table am-table-striped am-table-hover table-main">
				<thead>
					<tr>
						<th class="table-check"><input type="checkbox" /></th>
						<th class="table-type">计划id</th>
						<th class="table-type">项目id</th>
						<th class="table-title">项目名称</th>
						<th class="table-title">计划名称</th>
						<th class="table-type">项目状态</th>
						<th class="table-date">计划日期</th>
						<th  class="table-type">操作</th>
					</tr>
				</thead>
				<tbody>
					#{if plans!=null} #{set count:1/} #{list
					items:plans.data,as:'bean'}
					<tr>
						<td><input type="checkbox" /></td>
						<td>${bean?.plan_id}</td>
						<td>${bean?.project_id}</td>
						<td>${bean?.project_name}</td>
						<td>${bean?.plan_name}</td>
						<td>#{if bean?.project_state==0} <span style="color: gray;">未开始</span>
							#{/if} #{elseif bean?.project_state==1} <span style="color: green;">进行中</span>
							#{/elseif} #{elseif bean?.project_state==2} <span style="color: red">暂停</span>
							#{/elseif}
							 #{elseif bean?.project_state==3} <span style="color: gray">已结束</span>
							#{/elseif}
						</td>
						<td>${bean?.plan_date}</td>
						<td>
						 	<button onclick="goUrl('@{production.ProductionPlanAction.planDetailIndex}?plan_id=${bean?.plan_id}')"
													class="am-btn am-btn-default am-btn-xs am-text-secondary">
													<span class="am-icon-pencil-square-o"></span> 查看工序产能
							</button>
						</td>
					</tr>
					#{/list} #{/if}
				</tbody>
			</table>
		</div>
		
	</div>
 
 </div>
<!-- content end -->